<?php
include("../libreria/config.php");
include("../libreria/db.php");
?>
<html>
	<head>	
		<title>Materias</title>
		<link type="text/css" href="../jquery/css/redmond/jquery-ui-1.8.13.custom.css" rel="stylesheet" />
		<link rel="stylesheet" type="text/css" href="../jquery/css/redmond/estilostv.css" media="all"/>		
		<script type="text/javascript" src="../jquery/js/jquery-1.5.1.min.js"></script>
		<script type="text/javascript" src="../jquery/js/jquery-ui-1.8.13.custom.min.js"></script>
		<script type="text/javascript" src="../jquery.lightbox_me.js"></script>
	</head>
<body>
<center>
<div id="users-contain" class="ui-widget">
	<h1>Materias:</h1>
	<table id="users" class="ui-widget ui-widget-content">
		<thead>
			<tr class="ui-widget-header ">
				<th>Materia</th>
				<th>Area</th>
				<th>Carga Horaria</th>
				<th>Descripcion</th>
				<th>Bibliografia</th>
				<th>Modificar</th>
				
			</tr>
		</thead>
		<tbody>
			<?php
				$sql = "select * from materia";
				$result = dbQuery($sql);
				
				while($row = dbFetchAssoc($result))
				{
					echo "<tr>
							<td>".$row['nombre_materia']."</td>
							<td>".$row['area']."</td>
							<td>".$row['carga_horaria']."</td>
							<td>".$row['descripcion']."</td>
							<td>".$row['bibliografia']."</td>
							<td><a href='asignaturas.php?id=$row[id_materia]'>Modificar</a></td>
						<tr>						
						";			
				}
mysql_free_result($result);				
			?>
		</tbody>
	</table>
</div>
</center>
</body>